class Book < ActiveRecord::Base
  has_one :user
  has_one :condition
  
   #validation
  validates_length_of :title, :within => 3..100
  validates_presence_of :isbn
  validates_presence_of :condition_id
  validates_presence_of :user_id
  #comment
  
  #class Methods
  def self.getAllBooks
    find(:all, :order => "title")
  end
  
  
  
  
end
